package Prototype;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * @ProjectName: 23种设计模式
 * @Package: Prototype
 * @ClassName: Main
 * @Author: renhan
 * @Description:
 * @Date: 2020/11/14 8:59
 * @Version: 1.0
 */
public class Main {

    public static void main(String[] args) {
        Person person1 = new Person();
        person1.setName("dage");
        person1.setAge(33);
        person1.setSex("man");
        Integer  a = 0;


        List<String> frends = new ArrayList<>();
        frends.add("fongzi");
        frends.add("jiugui");
        person1.setFrends(frends);
        Person person3= person1; //浅拷贝
        List<String> person4 = frends;
        Person person2 = person1.clone();//深浅拷贝的区别
        person2.setName("erdi");
        frends.add("hh");
        ff(a);
        a++;
        System.out.println(person1.toString());
        System.out.println(person2.toString());
        System.out.println(person3.toString());
        System.out.println(a);
    }

    private static void ff(Integer  f){
        f=1;
    }

}
